package cn.edu.sjtu.se.dslab.project;

/**   
* @Title: Position.java
* @Package cn.edu.sjtu.se.dslab.project
* @Description: 描述页面上的位置
* @author Thinker
* @date 2014-5-7
* @version V1.0
*/ 

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

/** 
 * @ClassName: Project
 * @Description: Use the project to organize
 * @author Thinker
 * @date 2013-9-11 上午10:47:44
 * 
 */
@Entity
@Table(name = "position")
public class Position implements Serializable{
	private static final long serialVersionUID = 3266329354535100561L;

	private long id;
	
	private String name;
	
	private int xIndex;
	
	private int yIndex;
	
	public Position(){}
	public Position(String name, int xIndex, int yIndex){
		this.name = name;
		this.xIndex = xIndex;
		this.yIndex = yIndex;
	}
	

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	public long getId() {
		return id;
	}

	
	public void setId(long id) {
		this.id = id;
	}
	
	@Column(name = "name", nullable = true, length = 255)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Column(name = "x_index", nullable = false)
	public int getxIndex() {
		return xIndex;
	}


	public void setxIndex(int xIndex) {
		this.xIndex = xIndex;
	}

	@Column(name = "y_index", nullable = false)
	public int getyIndex() {
		return yIndex;
	}


	public void setyIndex(int yIndex) {
		this.yIndex = yIndex;
	}
	
}
